<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>奶茶店后台管理系统</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<!--    引入导航栏组件-->
    <div th:insert="components/main::navbar"></div>
<!--    引入侧边栏组件 -->
    <div th:insert="components/main::siderbarnone"></div>

    <div class="layui-body">
        <form class="layui-form" method="post" th:action="@{/manage/insertproduct}" enctype="multipart/form-data" style="width: 500px;margin: 50px auto;">

            <div class="layui-form-item">
                <label class="layui-form-label">产品名</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" required lay-verify="required" placeholder="请输入产品名" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux" th:text="产品名称"></div>
                </div>

            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">产品类别</label>
                <div class="layui-input-inline">
                    <input type="radio" name="category" value="1" title="奶茶">
                    <input type="radio" name="category" value="2" title="咖啡">
                </div>
                <div class="layui-form-mid layui-word-aux" th:text="产品类别"></div>

            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">价格</label>
                <div class="layui-input-inline">
                    <input type="number" name="price" required lay-verify="required" placeholder="请输入产品价格" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux" th:text="产品价格"></div>

                </div>
            </div>



            <div class="layui-form-item">
                <label class="layui-form-label">产品描述</label>
                <div class="layui-input-inline">
                    <textarea name="remark" required lay-verify="required" placeholder="请输入" class="layui-textarea"></textarea>
                </div>
                <div class="layui-form-mid layui-word-aux" th:text="产品描述"></div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">奶茶图片</label>
                <div class="layui-input-inline layui-btn layui-btn-normal">
                    <i class="layui-icon">&#xe67c;</i>
                    <input name="img" type="file" required lay-verify="required" >
                </div>
                <div class="layui-form-mid layui-word-aux" th:text="仅支持小于1MB的图片文件"></div>
            </div>


            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>

        </form>
    </div>

    <div th:insert="components/main::bottombar"></div>

</div>

<script th:src="@{/layui/layui.js}"></script>

</body>
</html>